<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="index.css">
    <link rel="stylesheet" href="store.css">
</head>
<body>
    <div class="header">
        <div class="logo">
            <img height="100%" width="100%" src="asset/洋流朋克logo（中文）.png">
        </div>
        <div class="nav">
            <ul>
                <li><a href="index.html">主页</a></li>
                <li><a href="#">维基</a></li>
                <li><a href="#">常见问题</a></li>
                <li><a href="store.html">商店</a></li>
            </ul>
        </div>
        <div class="buy">
            <img class="buyflower" src="asset/PotCulture_0.png">
            <span class="buytext">立即购买</span>
        </div>
    </div>
    <div class="db">
        <img width:="63px"
        height="63px" id="steam" src="asset/steam-logo.webp"/>

        <img width:="63px"
        height="63px" id="wegame" src="asset/wegame-logo.png"/>
    </div>
    <div class="db-right">
        <img height="60px" src="asset/yugao.png">
    </div>

    <div class="gamebody">
        <div class="steambuy">
          <img src="asset/宣传末尾.png">
          <div class="steambuy-db">
            <button class="steambuy-btn">去Steam购买</button>
          </div>
        </div>
        <div class="wegamebuy">
        <img src="asset/wegame-bg.webp">
        <div class="wegamebuy-db">
            <button class="wegamebuy-btn">去Wegame购买</button>
        </div>
        </div>
    </div>



</body>
<script>

function hide(d){
    document.querySelector(d).style.display='none';
}

function show(d){
    document.querySelector(d).style.display='block';
}


setInterval(()=>{
    var width = window.innerWidth;
    if(width<1700){
            console.log("h");
            hide(".buy")
           
    }else{
        console.log("s");
            show(".buy")
    }

})
var steam = document.getElementById("steam");
var wegame = document.getElementById("wegame");
var db = document.querySelector(".db");
steam.onmousemove=()=>{
    db.className="db steamcolor"

}
db.onmouseout=()=>{
    db.className='db';
}
wegame.onmousemove=()=>{
    db.className="db wegamecolor"

}
var db_right=document.querySelector(".db-right");

db_right.onclick=function(){

    window.open("https://www.bilibili.com/video/BV1K44y1p79z")

}
//打开新网页
function openWeb(dom,url){
    document.querySelector(dom).onclick=()=>{
        window.open(url);
    }
}   


openWeb(".wegamebuy-btn","https://www.wegame.com.cn/store/2008129/Ocean_Current_Punk")
openWeb(".steambuy-btn",'https://store.steampowered.com/app/1883840/_Ocean_Current_Punk/')
openWeb("#wegame","https://www.wegame.com.cn/store/2008129/Ocean_Current_Punk");
openWeb("#steam",'https://store.steampowered.com/app/1883840/_Ocean_Current_Punk/')
</script>
</html>